/*
 * @Author: 陈娇
 * @Date: 2021-04-12 15:53:34
 * @LastEditTime: 2021-11-12 09:30:15
 * @LastEditors: Please set LastEditors
 * @Description: 系统首页数据封装
 * @FilePath: \ebc-admin\src\views\dashboard\config\index.js
 */
import { memberTotal, goodsTotal, orgTotal, dynamicTotal } from '@/api/member'
import { reportAuth, topicAuth, infoAuth, goodsAuth } from '@/api/dashboard'

// 实时数据
const realTimeData = [
  { label: 'todayMember', icon: 'el-icon-user-solid', value: '今日新增会员' ,router: '/statistic/member' },
  { label: 'nearMember', icon: 'el-icon-user', value: '近7日新增会员',router:'/statistic/member' },
  { label: 'todayEnterprises', icon: 'el-icon-s-home', value: '今日入驻企业' ,router: '/statistic/oganization' },
  { label: 'nearEnterprises', icon: 'el-icon-s-shop', value: '近7日入驻企业' ,router:'/statistic/oganization'}
]
// 实时数据-api
const total1 = [
  { api: memberTotal, key: 'memberTotal' },
  { api: memberTotal, key: 'todayMember', data: { type: '1' }},
  { api: memberTotal, key: 'nearMember', data: { type: '2' }},
  { api: memberTotal, key: 'memberAuth', data: { type: '3' }},
  { api: orgTotal, key: 'orgTotal' },
  { api: orgTotal, key: 'todayEnterprises', data: { type: '1' }},
  { api: orgTotal, key: 'nearEnterprises', data: { type: '2' }},
  { api: orgTotal, key: 'orgAuth', data: { type: '3' }}
]

// 待处理事务
const dealWithAffairs = [
  { label: 'topicAuth', value: '话题审核', router: '/operate/topic' },
  { label: 'infoAuth', value: '信息审核', router: '/organize/examine' },
  { label: 'goodsAuth', value: '商品审核', router: '/commodity/organizeProductReview' },
  { label: 'reportPreson', value: '聊天举报', router: '/report/chat' },
  { label: 'reportChat', value: '群聊举报', router: '/report/groupChat' },
  { label: 'reportDynamic', value: '动态举报', router: '/report/dynamic' },
  { label: 'reportCard', value: '个人名片举报', router: '/report/dynamic' },
  { label: 'reportOrganization', value: '组织名片举报', router: '/report/dynamic' }
]
// 待处理事务-api
const total2 = [
  { api: topicAuth, key: 'topicAuth' },
  { api: infoAuth, key: 'infoAuth' },
  { api: goodsAuth, key: 'goodsAuth' },
  { api: reportAuth, key: 'reportPreson', data: { type: '1' }},
  { api: reportAuth, key: 'reportChat', data: { type: '2' }},
  { api: reportAuth, key: 'reportDynamic', data: { type: '3' }},
  { api: reportAuth, key: 'reportCard', data: { type: '4' }},
  { api: reportAuth, key: 'reportOrganization', data: { type: '5' }}

]
// 会员动态和商品总数API
const total3 = [
  { api: goodsTotal, key: 'goodsTotal' },
  { api: dynamicTotal, key: 'dynamicTotal' }

]

// 快捷入口
const fastPort = [
  { label: 'memberList', value: '会员列表', href: '/member/list', icon: 'iconfont icon-huiyuanguanli' },
  { label: 'organizeList', value: '组织列表', href: '/organize/list', icon: 'iconfont icon-zuzhixinxi' },
  { label: 'operate', value: '幻灯片管理', href: '/operate/slide', icon: 'iconfont icon-yunyingjiankong' },
  { label: 'systemnews', value: '系统消息', href: '/news/systemnews', icon: 'iconfont icon-ai-message' },
  { label: 'opinionList', value: '意见反馈', href: '/opinion/opinionList', icon: 'iconfont icon-yijian' },
  { label: 'memberStatistics', value: '会员统计', href: '/statistic/total', icon: 'iconfont icon-ai-message' },
  { label: 'dynamicStatistics', value: '动态统计', href: '/statistic/dynamic', icon: 'iconfont icon-yijian' },
  { label: 'userSet', value: '用户端设置', href: '/basics/userSet', icon: 'iconfont icon-jichugongneng' },
  { label: 'enterpriseSet', value: '企业端设置', href: '/basics/enterpriseSet', icon: 'iconfont icon-jichugongneng' }
]

// 热门话题列表
const topicList = [
  {topicTitle:'国台办:愿迅速安排让台胞有疫苗用热', amount:'2000' },
  {topicTitle:'31省区市新增本土确诊2例', amount:'2000' },
  {topicTitle:'白银电视台回应重播马拉松开幕式', amount:'2000' },
  {topicTitle:'四川发生疑似有害气体中毒致5死', amount:'2000' },
  {topicTitle:'跟随甘肃牧羊人重走救援路', amount:'2000' },
] 
// 热门搜索列表
const searchList = [
  {content:'疫苗', amount:'2000' },
  {content:'确诊病例', amount:'2000' },
  {content:'马拉松', amount:'2000' },
  {content:'中毒致死', amount:'2000' },
  {content:'甘肃牧羊人', amount:'2000' },
] 
// 热门话题-热门搜索数据封装
const hot = [
  { title:'热门话题', key: 'topic',list: topicList },
  { title:'热门搜索', key: 'search',list: searchList}
]
export function useConfig() {
  return { realTimeData, total1, total2, total3, fastPort, dealWithAffairs,hot }
}
